const express = require('express');
const router = express.Router();
const { createUser, deleteUser, editUser, getUserList } = require('../control/usersManage')
const { auth } = require('../middlewares/auth')
const uploadMiddleware = require('../middlewares/uploadSingle')

// 创建用户
router.post('/create', auth, uploadMiddleware, createUser);

// 删除用户
router.post('/delete', auth, deleteUser);

// 修改用户
router.post('/edit', auth, editUser);

// 查询用户
router.get('/list', auth, getUserList);

module.exports = router;
